package com.xiaodao.beandefinition;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * Created by xiaodao
 * date: 2019/12/24
 */
public class CustomerAopBeanPostProcessor implements BeanPostProcessor {


	@Override
	public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
		if(bean instanceof UserService){
			bean  = CglibUtil.getProxy();

		}
		return bean;
	}
}
